import upsrc from './c-up.png';
import upDisabledSrc from './c-up-disabled.png';
import styles from './updown.less';
export default ({ onClick, canUp = true, canDown = true }) => {
  return (
    <div className={styles.container}>
      <img
        onClick={canUp ? () => onClick('up') : undefined}
        data-disabled={!canUp}
        src={canUp ? upsrc : upDisabledSrc}
        alt="up"
      />
      <img
        onClick={canDown ? () => onClick('down') : undefined}
        data-disabled={!canDown}
        src={canDown ? upsrc : upDisabledSrc}
        alt="down"
      />
    </div>
  );
};
